package com.taojiazheng.mapper;

import com.taojiazheng.entity.Order;
import com.taojiazheng.vo.Order.OrderVo;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface OrderMapper {
    int deleteByPrimaryKey(Integer id);

    /**
     * 创建订单
     * @param record
     * @return
     */
    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);
    /**
     * 获取order列表
     * 根据参数确定可以获得单个还是多个
     */
    List<OrderVo> getOrder(Order order);

    List<Order> getOrderByUserId(Map map);

    int deleteOrder(Integer id);
}